<?php namespace Common\Model;
use Hdphp\Model\Model;

class Typeattr extends Model{
	protected $table = "360mall_type_attr";
	//自动验证
	protected $validate = array(
	 array("ta_name","required","请输入属性名称",3,3),
	 array("ta_value","required","请输入属性值",3,3),
	);

	public function store(){
	 if(!$this->create()) return false;
	    $this->add();	
		return true;
       }
	//编辑
	  public function edit(){
	   if(!$this->create()) return false;
	   $this->save();
		return true;
	  }
}